<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title></title>
	<link rel="stylesheet" href="">
</head>
<body>
<script src="https://cdn.bootcss.com/vue/2.3.4/vue.js"></script>
<div id="root">
	<elem></elem>
</div>
<script>
	Vue.component('elem',{
		render : function(h){
			var self = this;
			return h('div',{
				'class' : {
					show : self.show,
				},
				style : {
					color : 'red',
					fontSize : '20px',
				},
				attrs : {
					id : 'elem',
				},
				domProps : {
					innerHTML : '你啊好啊',
				},
				on : {
					click : self.doClick,
				}
			},'这里是一个文本内容');
		},
		data : function(){
			return {show:true};
		},
		methods : {
			doClick : function(){
				console.log('我被点击了');
			}
		}
	});
	var vm = new Vue({
		el : '#root',
		data : {},
	})
</script>	
</body>
</html>